<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<c:choose>
<c:when test="${null == userSession}">
<div id="userlogin_error">
	<c:if test="${!empty loginForm}">
		<spring:bind path="loginForm.*">
			<font color="#FF0000">
				<c:forEach items="${status.errorMessages}"	var="error">
					${error}<br/>
				</c:forEach>
			</font>
		</spring:bind>
	</c:if>
</div>
<div id="userlogin">
<form action="${cp}/user/login.og" method="post"  name="loginForm">
	<table cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td width="35" align="left">Email</td>
			<td align="left">
				<input name="email" maxlength="50" type="text" class="v-input-text email-required" value="${loginForm.email}"/>
			</td>
		</tr>
		<tr>
			<td width="35" align="left">密&nbsp; 码</td>
			<td align="left">
				<input name="password" maxlength="20" type="password" class="v-input-text pswd-required" />
				<input name="redirectPath" type="hidden" value="<c:choose><c:when test="${!empty loginForm}">${loginForm.redirectPath}"</c:when><c:otherwise>${sp}</c:otherwise></c:choose>"/>
			</td>
		</tr>
		<tr>
		    <td></td>
		    <td style="color:#666;" align="left">
		    	<input id="enableCookie" type="checkbox" name="enableCookie" value="check"/>
		    	<label for="enableCookie">记住Email</lebel>&nbsp;<a href="${cp}/user/getpwd.og">忘记密码</a>
		    </td>
		</tr>
		<tr valign="bottom" align="center">
			<td colspan="2">
				<button id="login-button" class="index-button" type="submit">登录</button>
				&nbsp;
				<button id="reg-button" class="index-button" type="button" onclick="window.location.href='${cp}/user/register.og'">注册</button>
			</td>
		</tr>
	</table>
</form>
</div>
</c:when>
<c:otherwise>
<div id="usernav">
	<c:set var="uid" value="${userSession.login.id}"/>
	<div>
		<a title="我的个人资料" href="${cp}/user/info.og?userId=${uid}">我的资料</a>
		<a title="我的个人资料" href="${cp}/user/edit.og">修改资料</a>
	</div>
	<div class="v-line"></div>							
	<div>
		<a title="" href="${cp}/favor/list.og?userId=${uid}">发表的互助</a>
		<a title="" href="${cp}/favor/list.og?userId=${uid}&type=reply">参与的互助</a>	
	</div>
	<div>				
		<a title="" href="${cp}/favor/list.og?userId=${uid}&type=collect">收藏的互助</a>
	</div>
	<div><a title="" href="${cp}/favor/create.og">创建互助</a></div>					
	<div class="v-line"></div>				
	<div>
		<a title="" href="${cp}/service/my.og">我的服务</a>
	</div>
	<div>
		<a title="" href="${cp}/service/create.og">开通服务</a>
	</div>								
	<div class="v-line"></div>
	<div>
		<a title="" href="${cp}/user/my.og">我的朋友</a>
		<a title="" href="${cp}/user/myadded.og">收藏的朋友</a>
	</div>
	<div>
		<a title="" href="${cp}/user/my.og">我的组织</a>
	</div>										
	<div class="v-line"></div>																								
	<div><a title="退出登陆" href="${cp}/user/logout.og">[退出登陆]</a></div>
</div>
</c:otherwise>
</c:choose>

